package net.ib.mtalk.receiver;

import net.ib.mtalk.global.GlobalPreferences;
import net.ib.mtalk.service.SelecterService;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class EventReceiver extends BroadcastReceiver {

	public void onReceive(Context context, Intent intent) 
	{
		if(Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(intent.getAction()))	//HomeKey or PowerKey
		{
			if(GlobalPreferences.getBooleanLockChk())
				GlobalPreferences.setLock(true);
			
			SelecterService.setMode(context, SelecterService.Mode.MONO_SELECT);
		}
	}

}
